<?php
require_once VIEW_PATH . '/header.php'
?>

<div class="page-header">

    <?php foreach ($this->category as $item) {
        if ($id == $item->id) {
            ?>
            <div class="bg" data-aos="zoom-in" style="background-image: url('<?php echo $item->images[0] ?>')"></div>
            <div class="container" data-aos="fade-down">
                <div class="title"><?php echo $item->title ?></div>
                <div class="desc"></div>
            </div>
            <?php
        }
    } ?>

</div>
<div class="page-content">
    <div class="container">
        <div class="ling-list">
            <?php foreach ($data as $item) {
                ?>
                <div class="ling-item" data-aos="flip-left">
                    <div class="border">
                        <a href="/index/index/lingDetail/<?php echo $item->id ?>">
                           <div class="ling-item-img">
                               <img src="<?php echo $item->images[0] ?>">
                               <div class="ling-item-info">
                                   <?php echo $item->title ?>
                               </div>
                           </div>

                       </a>
                    </div>
                </div>
                <?php
            } ?>

        </div>
    </div>
</div>

<?php
require_once VIEW_PATH . '/footer.php' ?>
